VERSION 5.00
Begin VB.Form FrmReportDateRange 
   BackColor       =   &H8000000D&
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Report Date Range"
   ClientHeight    =   2415
   ClientLeft      =   2760
   ClientTop       =   3750
   ClientWidth     =   4815
   ControlBox      =   0   'False
   FillColor       =   &H00FF0000&
   ForeColor       =   &H00C00000&
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2415
   ScaleWidth      =   4815
   ShowInTaskbar   =   0   'False
   Begin VB.Frame FrmeOption 
      BackColor       =   &H8000000D&
      Caption         =   "Option"
      Enabled         =   0   'False
      ForeColor       =   &H8000000E&
      Height          =   1095
      Left            =   240
      TabIndex        =   5
      Top             =   1200
      Width           =   2055
      Begin VB.OptionButton Option1 
         BackColor       =   &H8000000D&
         Caption         =   "Show all items"
         ForeColor       =   &H00FFFFFF&
         Height          =   375
         Left            =   120
         TabIndex        =   7
         Top             =   240
         Width           =   1695
      End
      Begin VB.OptionButton Option2 
         BackColor       =   &H8000000D&
         Caption         =   "Only items effected"
         ForeColor       =   &H8000000E&
         Height          =   375
         Left            =   120
         TabIndex        =   6
         Top             =   600
         Width           =   1695
      End
   End
   Begin VB.TextBox edate 
      Height          =   375
      Left            =   2400
      TabIndex        =   1
      Top             =   840
      Width           =   1695
   End
   Begin VB.TextBox bdate 
      Height          =   375
      Left            =   2400
      TabIndex        =   0
      Top             =   240
      Width           =   1695
   End
   Begin VB.CommandButton OKButton 
      Caption         =   "Pre&view"
      Height          =   375
      Left            =   2760
      TabIndex        =   2
      Top             =   1560
      Width           =   1215
   End
   Begin VB.Label Label1 
      BackColor       =   &H8000000D&
      Caption         =   "Ending Trans Date"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   375
      Index           =   1
      Left            =   360
      TabIndex        =   4
      Top             =   840
      Width           =   1695
   End
   Begin VB.Label Label1 
      BackColor       =   &H8000000D&
      Caption         =   "Begin Trans Date"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   375
      Index           =   0
      Left            =   360
      TabIndex        =   3
      Top             =   240
      Width           =   1695
   End
End
Attribute VB_Name = "FrmReportDateRange"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit

Private Sub bdate_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        edate.SetFocus
    ElseIf KeyAscii = 27 Then
        Reportflg = False
        Unload FrmReportDateRange
        'Unload frmINV200
    End If
End Sub



Private Sub edate_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        If IsNull(bdate) Or IsNull(edate) Then
            MsgBox "You must enter both beginning and ending dates."
            bdate.SetFocus
        Else
            If bdate > edate Then
                MsgBox "Ending date must be greater than Beginning date."
                bdate.SetFocus
            Else
                Me.Visible = False
            End If
        End If
    ElseIf KeyAscii = 27 Then
        Reportflg = False
        Unload FrmReportDateRange
    End If
End Sub


Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 27 Then
    Unload FrmReportDateRange
    Unload frmINV200
    End If
End Sub

Private Sub Form_Load()
    Me.Option1 = True
End Sub

Private Sub OKButton_Click()
    If IsNull(bdate) Or IsNull(edate) Then
        MsgBox "You must enter both beginning and ending dates."
        bdate.SetFocus
    Else
        If bdate > edate Then
            MsgBox "Ending date must be greater than Beginning date."
            bdate.SetFocus
        Else
            Me.Visible = False
        End If
    End If
End Sub

Private Sub Option1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 27 Then
        Reportflg = False
        Unload FrmReportDateRange
    End If
End Sub

Private Sub Option2_KeyPress(KeyAscii As Integer)
    If KeyAscii = 27 Then
        Reportflg = False
        Unload FrmReportDateRange
    End If
End Sub
